#ifndef __EEPROM_H__
#define __EEPROM_H__

#include <STC/STC89C5xRC.H>
#include <intrins.h>
#include "tf_cmn.h"

//#define UCHAR unsigned char
//#define UINT    unsigned int
//
////sfr ISP_DATA  = 0xe2;
////sfr ISP_ADDRH = 0xe3;
////sfr ISP_ADDRL = 0xe4;
////sfr ISP_CMD   = 0xe5;
////sfr ISP_TRIG  = 0xe6;
////sfr ISP_CONTR = 0xe7;
//
//#define EE_BYTE_READ 1
//#define EE_BYTE_PROGRAM 2
//#define EE_BYTE_SECTOR_ERASE 3
//#define WAIT_TIME 1

void ee_write(UINT addr, UCHAR dat);

UCHAR ee_read(UINT addr);
void ee_disable();
void ee_erase(UINT addr);

#endif